﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ajax_article_save : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string userid = Request["userid"].ToString();
            string articletitle = Request["articletitle"].ToString();
            string acontent = Request["acontent"].ToString();
            acontent = acontent.Replace("'", "\"");

            TCMSArticle oArticle = new TCMSArticle();
            oArticle.GetNewID();
            oArticle.Title = articletitle;
            oArticle.AContent = acontent;
            oArticle.Issue_time = System.DateTime.Now;
            oArticle.UserID = userid;
            TUser oUser = new TUser(userid);
            oUser.Select();
            oArticle.Author = oUser.BigName;
            //---
            oArticle.Columns = "C01";
            oArticle.SubTitle = "";
            oArticle.Keywords = "";
            oArticle.Foreword = "";
            oArticle.Inure_time = System.DateTime.Now;
            oArticle.Abort_time = System.DateTime.Now;
            oArticle.Source = "";
            oArticle.Publisher = "";
            oArticle.PV = 0;
            oArticle.Source = "";
            oArticle.ALevel = 0;
            oArticle.Grade = 0;
            oArticle.Chknotice = "";
            oArticle.OrderbyTime = System.DateTime.Now;
            oArticle.OrderbyNum = 0;
            oArticle.Relations = "";
            oArticle.HtmlStatus = 0;
            oArticle.HtmlFileName = "";
            oArticle.HtmlPages = 1;
            oArticle.PageTitles = "";
            //---
            oArticle.Insert();
            //---
            Response.End();
        }
    }
}
